<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="https://www.thymeleaf.org/thymeleaf-extras-shiro">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<h3>首页</h3>

[[${msg}]]

<div style="margin: 5px auto">
    <div th:if="${session.login==null}">
        <a th:href="@{/login}">登录</a>
    </div>
    <div th:if="${session.login!=null}">
        <a th:href="@{/logout}">注销</a>
    </div>
</div>

<div>
    <a th:href="@{/user/list}">列表</a>
    <div shiro:hasPermission="user:add">
        <a th:href="@{/user/add}">添加</a>
    </div>
    <div shiro:hasPermission="user:add">
        <a th:href="@{/user/update}">修改</a>
    </div>
    <div shiro:hasPermission="user:add">
        <a th:href="@{/user/delete}">删除</a>
    </div>
</div>

</body>
</html>